<div class="header">
  <back-Btn></back-Btn>
  工作报告
</div>
<div class="container reportdetail nofooter">
  <div class="content">
    <div class="userinfo flex celled">
      <div class="item-avtar tc lh50">
        <img ng-src="{{reportdetail.data.portrait}}" ng-if="reportdetail.data.portrait">
        {{reportdetail.data.personName}}
      </div>
      <div class="w80">
        <p class="fs18 lh30">{{reportdetail.data.personName}}</p>
        <p class="fs14 c9">{{reportdetail.data.createDate}}</p>
      </div>
      <div class="read-btn" ng-hide="reportdetail.data.confirmRead" ng-click="reportdetail.makeRead()" ng-if="reportdetail.type==2||reportdetail.type==3">确认已阅</div>
    </div>
    <div class="report-part">
      <div class="c-blue fr" ng-if="reportdetail.data.mine" ng-click="reportdetail.editReport()">
        <span class="report-edit"></span></div>
      <p class="report-title">{{reportdetail.data.title}}</p>
      <div class="report-section">
        <p class="report-label lh30">报告类型</p>
        <p class="report-value"> {{reportdetail.data.reportType}}</p>
      </div>
      <div class="report-section" ng-show="reportdetail.data.content">
        <div class="report-label lh30">已完成的工作</div>
        <div class="report-value lh20 fs14" ng-bind-html="reportdetail.data.content|parsetohtml">
          </p>
        </div>
      </div>
      <div class="report-section" ng-show="reportdetail.data.unfinishedWork">
        <div class="report-label lh30">未完成的工作</div>
        <div class="report-value lh20 fs14" ng-bind-html="reportdetail.data.unfinishedWork|parsetohtml">
          </p>
        </div>
      </div>
      <div class="report-section" ng-show="reportdetail.data.assistedWork">
        <div class="report-label lh30">需协助的工作</div>
        <div class="report-value lh20 fs14" ng-bind-html="reportdetail.data.assistedWork|parsetohtml">
          </p>
        </div>
      </div>
      <div class="report-section" ng-show="reportdetail.data.difficultWork">
        <div class="report-label lh30">遇到的困难</div>
        <div class="report-value lh20 fs14" ng-bind-html="reportdetail.data.difficultWork|parsetohtml">
          </p>
        </div>
      </div>
      <div class="report-section" ng-show="reportdetail.data.remark">
        <div class="report-label lh30">建议及备注</div>
        <div class="report-value lh20 fs14" ng-bind-html="reportdetail.data.remark|parsetohtml">
          </p>
        </div>
      </div>
      <div class="report-section" ng-show="reportdetail.data.nextWork">
        <div class="report-label lh30">下一步的工作</div>
        <div class="report-value lh20 fs14" ng-bind-html="reportdetail.data.nextWork|parsetohtml">
          </p>
        </div>
      </div>
    </div>
    <div checkuser-define field-map="reportdetail.data.customFields"></div>
    <div class="report-followList lh30 pd10 celled">
      <div class="report-label">关注人</div>
      <div class="joinpeople-list" ng-show="reportdetail.data.followList.length">
        <div class="joinpeople-wrapper">
          <div class="joinpeople-item tc " ng-repeat="item in reportdetail.data.followList track by item.userId">
            <div class="item-avtar lh50 ">
              <img ng-src={{item.portrait}} ng-if="item.portrait" /> {{item.personName|username}}
            </div>
            <p class="lh20">{{item.personName|username}}</p>
          </div>
        </div>
      </div>
      <!-- 附件 -->
      <div class="file-upload" file-list checked="true" file-data="reportdetail.data.attachment" class="celled"
        ng-if="reportdetail.data.attachment">
      </div>
    </div>
    <div class="section-hr"></div>
    <div class="report-delete-btn" ng-if="reportdetail.type==0" ng-click="reportdetail.confirmdel()">
      <span class="report-delete"></span>删除</div>
    <div class="report-part" ng-if="reportdetail.type!=0">
      <div class="comment-list">
        <div class="report-title lh30">回复</div>
        <div class="comment-item flex" ng-repeat="item in reportdetail.data.actions ">
          <div class="item-avtar tc">
            <img ng-src={{item.portrait}} ng-if="item.portrait"> {{item.personName|username}}
          </div>
          <div class="w80">
            <p>{{item.personName}}
              <span class="fr fs14 c9">{{item.createDate}}</span>
            </p>
            <div class="fs14 comment-content" ng-bind-html="item.content"
              ng-class="{'c-blue':item.actionType==1||item.actionType==3}"></div>
            <div class="file-upload" file-list checked="true" file-data="item.attachment" ng-if="item.attachment">
            </div>
            <span class="c-red" ng-if="item.actionType==2&&item.userId==curUID"
              ng-click="reportdetail.delComment(item,$index)">删除</span>
          </div>
        </div>
      </div>
    </div>

  </div>
  <comment comment-obj="reportdetail.data.actions" follow-obj="reportdetail.data.followList"
    pk-id="{{reportdetail.data.pkId}}" ng-if="reportdetail.type!=0"></comment>
  <div class="prevOrnext grid">
    <div class="report-pre" ng-click="reportdetail.getPrevOrNextData('prev')">
    </div>
    <div class="report-next" ng-click="reportdetail.getPrevOrNextData('next')">
    </div>
  </div>
</div>